package com.zhihua.interview.merge.service.impl;

import com.zhihua.interview.merge.biz.MergeBiz;
import com.zhihua.interview.merge.service.IMergeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MergeServiceImpl implements IMergeService {

    @Autowired
    public MergeBiz mergeBiz;

    /**
     * 接收json对象，把order集合中与stock集合中goodsId商品ID相同的记录，number数量相加合并，返回相加后的集合。集合名称为stock
     * 具体计算方法写在biz层。
     */
    @Override
    public String mergeNumber(String json) {
        return mergeBiz.mergeNumberBiz(json);

    }
}
